<div class="layui-fluid layui-anim website-anim" id="website-standard-detail" lay-title="评审标准信息">
    <div class="layui-row website-container">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body website-table-full" id="table-view">
                    <form class="layui-form layui-table-form">
                        <div class="layui-row">
                            <div class="layui-col-md12">
                                <div class="layui-form-item">
                                    <div class="layui-inline layui-col-md6">
                                        <label class="website-form-item-require">名称:</label>
                                        <span>[[${standard.name}]]</span>
                                    </div>
                                    <div class="layui-inline layui-col-md6">
                                        <label class="website-form-item-require">要求说明:</label>
                                        <span>[[${standard.explainContent}]]</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <table lay-filter="standardTableDetail" lay-data="{id: 'standardTableDetail'}"></table>
                        </div>
                        <input type="hidden" id="standardId" data-th-value="${standard.standardId}"/>
                        <div class="layui-form-item">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="standard-detail-option">
    <a lay-event="detail" shiro:hasPermission="standard:update" class="website-blue">详情</a>
</script>
<script data-th-inline="none" type="text/javascript">

    layui.use(['jquery', 'form', 'table', 'website'], function () {
        var $ = layui.jquery,
            website = layui.website,
            form = layui.form,
            table = layui.table,
            $view = $('#website-standard-detail'),
            $searchForm = $view.find('form'),
            tableIns,
            validate = layui.validate;
        form.verify(validate);

        initTable();
        form.render();
        table.on('tool(standardTableDetail)', function (obj) {
            var data = obj.data,
                layEvent = obj.event;
            if (layEvent === 'detail') {
                layer.closeAll();
                website.modal.view('评审标准详细信息', 'biz/indicatorDetail/detail/' + data.indicatorId, {
                    area: $(window).width() <= 750 ? '95%' : '50%'
                });
            }
        });
        table.on('sort(standardTableDetail)', function (obj) {
            tableIns.reload({
                initSort: obj,
                where: $.extend(getQueryParams(), {
                    field: obj.field,
                    order: obj.type
                })
            });
        });
        function initTable() {
            tableIns = website.table.init({
                elem: $view.find('table'),
                id: 'standardTableDetail'
                ,limit: 10 //注意：请务必确保 limit 参数（默认：10）是与你服务端限定的数据条数一致
                , url: ctx + 'indicator/list'
                ,cols: [[
                    {type: 'numbers', title: '序号'},
                    {field: 'name', title: '名称', minWidth: 150},
                    {field: 'description', title: '描述', minWidth: 150},
                    {field: 'weight', title: '权重', minWidth: 50},
                    {title: '操作', toolbar: '#standard-detail-option', minWidth: 50}
                ]],
                where : {
                standardId : $("#standardId").val(),
            }
            });
        }
    })
</script>